package cn.edu.zafu.bigdata.XuShuXin.Exp1022;

public class XuShuxinCircle_2 extends XuShuxinShape_2{

    double radius;

    static double pi = 3.1415926;

    //构造方法
    public XuShuxinCircle_2(double radius) {
        this.radius = radius;
    }
    @Override
    public double area() {
        return pi * radius * radius ;
    }
    @Override
    public double perimenter() {
        return 2 * pi * radius;
    }

}
